//
//  TMRecommendViewCell.m
//  国学培训用户端
//
//  Created by Tao Li on 2018/8/15.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "TMRecommendViewCell.h"
#import "TMRecommendModel.h"
@implementation TMRecommendViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.iconimage.contentMode = UIViewContentModeScaleAspectFill;
    self.iconimage.clipsToBounds = YES;
}
-(void)setModel:(TMRecommendModel *)model{
    _model = model;
    [self.iconimage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithBaseUrl:model.pic[0]]] placeholderImage:kPlaceholder];
    self.titlelabel.text = model.name;
    self.priceLabel.text = [NSString stringWithFormat:@"¥%.02f",model.price];
}
- (void)setLocalModel:(TMRecommendModel *)localModel{
    _localModel = localModel;
    [self.iconimage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithBaseUrl:localModel.userimage]] placeholderImage:kPlaceholder];
    self.titlelabel.text = localModel.username;
    //self.priceLabel.text = [NSString stringWithFormat:@"%.02f",localModel.price];
    self.priceLabel.hidden = YES;
    self.buttonConst.constant = 6;
}
@end
